const nums = [0,1,0,3,12]
var moveZeroes = function(nums) {
    let slowIndex = 0;
    for (let fastIndex = 0; fastIndex < nums.length; fastIndex++) {
        if (nums[fastIndex] !== 0) {
            [nums[slowIndex], nums[fastIndex]] = [nums[fastIndex], nums[slowIndex]];
            console.log(nums,'当前')
            slowIndex++;
        }
    }
    return nums;
};
console.log(moveZeroes(nums))